/**
 * 
 */
package com.piz.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author prameetk.sharma
 *
 */
@Entity
@Table(name="order_details")
public class OrderDetails implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private Long itemId;
	private Long serveId;
	private Integer quantity;
	private Double totalPrice;
	private Ordertxn order_txn;
	/**
	 * 
	 */
	public OrderDetails() {
		// TODO Auto-generated constructor stub
	}
	/**
	 * @param itemId
	 * @param serveId
	 * @param quantity
	 * @param totalPrice
	 */
	public OrderDetails(Long itemId, Long serveId, Integer quantity,
			Double totalPrice) {
		this.itemId = itemId;
		this.serveId = serveId;
		this.quantity = quantity;
		this.totalPrice = totalPrice;
	}
	/**
	 * @return the Long id
	 */
	@Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="ID")
	public Long getId() {
		return id;
	}
	/**
	 * @param id Long the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the Long itemId
	 */
	@Column(name="ITEM_ID")
	public Long getItemId() {
		return itemId;
	}
	/**
	 * @param itemId Long the itemId to set
	 */
	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}
	/**
	 * @return the Long serveId
	 */
	@Column(name="SERVE_ID")
	public Long getServeId() {
		return serveId;
	}
	/**
	 * @param serveId Long the serveId to set
	 */
	public void setServeId(Long serveId) {
		this.serveId = serveId;
	}
	/**
	 * @return the Integer quantity
	 */
	@Column(name="Quantity")
	public Integer getQuantity() {
		return quantity;
	}
	/**
	 * @param quantity Integer the quantity to set
	 */
	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
	/**
	 * @return the Double totalPrice
	 */
	@Column(name="totalPrice")
	public Double getTotalPrice() {
		return totalPrice;
	}
	/**
	 * @param totalPrice Double the totalPrice to set
	 */
	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}
	/**
	 * @return the Order_txn order_txn
	 */
	@ManyToOne
	@JoinColumn(name="order_id", 
				insertable=false, updatable=false, 
				nullable=false)
	public Ordertxn getOrder_txn() {
		return order_txn;
	}
	/**
	 * @param order_txn Order_txn the order_txn to set
	 */
	public void setOrder_txn(Ordertxn order_txn) {
		this.order_txn = order_txn;
	}
	
	

}
